package ru.voronoy.thefifteen.config;

import java.awt.Color;
import java.awt.Point;
import java.util.HashMap;
import java.util.Map;

public class BoneConf
{
	private static BoneConf instance = null;

	public static BoneConf getInstance()
	{
		if (instance == null)
		{
			instance = new BoneConf();
		}
		return instance;
	}

	public final int SPACE = 100;

	public final Point FIRST = new Point(0, 0);
	public final Point SECOND = new Point(SPACE, 0);
	public final Point THIRD = new Point(SPACE * 2, 0);
	public final Point FOURTH = new Point(SPACE * 3, 0);
	public final Point FIFTH = new Point(0, SPACE);
	public final Point SIXTH = new Point(SPACE, SPACE);
	public final Point SEVENTH = new Point(SPACE * 2, SPACE);
	public final Point EIGHT = new Point(SPACE * 3, SPACE);
	public final Point NINTH = new Point(0, SPACE * 2);
	public final Point TENTH = new Point(SPACE, SPACE * 2);
	public final Point ELEVENTH = new Point(SPACE * 2, SPACE * 2);
	public final Point TWELFTH = new Point(SPACE * 3, SPACE * 2);
	public final Point THIRTEENTH = new Point(0, SPACE * 3);
	public final Point FOURTEENTH = new Point(SPACE, SPACE * 3);
	public final Point FIFTEENTH = new Point(SPACE * 2, SPACE * 3);
	public final Point SIXTEENTH = new Point(SPACE * 3, SPACE * 3);

	public final Color BorderColor = Color.BLACK;
	public final int BorderThikness = 2;
	public boolean RoundCorners = false;

	// карта соответствия координат и правильного (итогового) расположения
	// "костяшек"
	public Map<String, Point> CoordinatesSet()
	{
		Map<String, Point> coordinates = new HashMap<String, Point>();
		coordinates.put("1", FIRST);
		coordinates.put("2", SECOND);
		coordinates.put("3", THIRD);
		coordinates.put("4", FOURTH);
		coordinates.put("5", FIFTH);
		coordinates.put("6", SIXTH);
		coordinates.put("7", SEVENTH);
		coordinates.put("8", EIGHT);
		coordinates.put("9", NINTH);
		coordinates.put("10", TENTH);
		coordinates.put("11", ELEVENTH);
		coordinates.put("12", TWELFTH);
		coordinates.put("13", THIRTEENTH);
		coordinates.put("14", FOURTEENTH);
		coordinates.put("15", FIFTEENTH);
		coordinates.put("16", SIXTEENTH);
		return coordinates;
	}

}
